/**
 * 作者：陈文斌 on 2019/1/18.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:json_annotation/json_annotation.dart';
import 'company_type_model.dart';
import 'company_attachment_model.dart';
import 'package:crm/model/DBPoint/db_point_model.dart';
import 'package:crm/model/Member/member_model.dart';
import 'package:crm/model/Customer/customer_model.dart';
import 'package:crm/model/Customer/customer_group_model.dart';
import 'package:crm/model/Employee/employee_model.dart';
import 'package:crm/model/Company/company_category_model.dart';
import 'package:crm/model/Company/company_request_model.dart';
import 'package:crm/model/Employee/employee_Invite_model.dart';
import 'package:crm/model/Company/company_ext_relate_model.dart';

part 'company_info_model.g.dart';

@JsonSerializable()
class CompanyInfoModel extends Object with _$CompanyInfoModelSerializerMixin{
  String Id;
  String AppId;
  double Point1;
  String OwnerId;
  String TypeId;
  CompanyTypeModel Type;
  String CreatedTime;
  String DisabledTime;
  String OffTime;
  String UpdateTime;
  String ProductUpdateTime;
  int VerifyStatus;
  String LastVerifyTime;
  String VerifyPassTime;
  String Name;
  String BrandName;
  String LogoUrl;
  String CustomSiteUrl;
  String VisualizationImgUrl;
  String VisualizationUrlPC;
  String LegalPersonName;
  String LegalPersonIdCardNo;
  String LegalPersonIdCardExpiryDate;
  String LegalPersonJobTitle;
  String LegalPersonIdCard1;
  String LegalPersonIdCard2;
  String BusinessLicenceImgUrl;
  String BusinessLicenceExpiryDate;
  String CreditCode;
  int RegisteredCapital;
  String ResidentCountry;
  String ResidentProvince;
  String ResidentCity;
  String ResidentArea;
  String Address;
  DBPointModel GeoLocation;
  String ServiceTel;
  String ServiceTelImgEncodedData;
  String WebsiteUrl;
  bool NeedJoinVerifyCode;
  String AboutUs;
  bool NotAllPass;
  bool IsIndividual;
  List<CompanyAttachmentModel> Attachments;
  int RelationshipOfUs;
  bool IsFavorited;
  MemberModel Owner;
  List<CustomerModel> Customers;
  List<CustomerGroupModel> CustomerGroups;
  List<EmployeeModel> Employees;
  List<CompanyCategoryInfoModel> Categories;
  List<CompanyRequestModel> CompanyRequests;
  List<EmployeeInviteModel> EmployeeInvites;
  List<CompanyExtRelateModel> ExtRelates;
  List<CompanyExtRelateModel> CurrExtRelates;
  String ContactId;
  EmployeeModel ContactEmployee;
  bool HasProducts;
  bool HasSites;
  bool HasPublishedSites;
  bool SiteBrowsed;
  bool CompanyBrowsed;
  bool ProductBrowsed;
  bool IsShowFullDetails;
  bool ContacterIsNull;
  String CustomCompanyCategories;
  String CustomIndustryCategories;
  String CustomMainBusiness;

  CompanyInfoModel(
    this.Id,
    this.AppId,
    this.Point1,
    this.OwnerId,
    this.TypeId,
    this.Type,
    this.CreatedTime,
    this.DisabledTime,
    this.OffTime,
    this.UpdateTime,
    this.ProductUpdateTime,
    this.VerifyStatus,
    this.LastVerifyTime,
    this.VerifyPassTime,
    this.Name,
    this.BrandName,
    this.LogoUrl,
    this.CustomSiteUrl,
    this.VisualizationImgUrl,
    this.VisualizationUrlPC,
    this.LegalPersonName,
    this.LegalPersonIdCardNo,
    this.LegalPersonIdCardExpiryDate,
    this.LegalPersonJobTitle,
    this.LegalPersonIdCard1,
    this.LegalPersonIdCard2,
    this.BusinessLicenceImgUrl,
    this.BusinessLicenceExpiryDate,
    this.CreditCode,
    this.RegisteredCapital,
    this.ResidentCountry,
    this.ResidentProvince,
    this.ResidentCity,
    this.ResidentArea,
    this.Address,
    this.GeoLocation,
    this.ServiceTel,
    this.ServiceTelImgEncodedData,
    this.WebsiteUrl,
    this.NeedJoinVerifyCode,
    this.AboutUs,
    this.NotAllPass,
    this.IsIndividual,
    this.Attachments,
    this.RelationshipOfUs,
    this.IsFavorited,
    this.Owner,
    this.Customers,
    this.CustomerGroups,
    this.Employees,
    this.Categories,
    this.CompanyRequests,
    this.EmployeeInvites,
    this.ExtRelates,
    this.CurrExtRelates,
    this.ContactId,
    this.ContactEmployee,
    this.HasProducts,
    this.HasSites,
    this.HasPublishedSites,
    this.SiteBrowsed,
    this.CompanyBrowsed,
    this.ProductBrowsed,
    this.IsShowFullDetails,
    this.ContacterIsNull,
    this.CustomCompanyCategories,
    this.CustomIndustryCategories,
    this.CustomMainBusiness,
  );

  @override
  factory CompanyInfoModel.fromJson(Map<String, dynamic> json) => _$CompanyInfoModelFromJson(json);
}
